package com.lx.constant.segment;

import com.lx.wrapper.AbstractCommonConditionWrapper;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.query.Query;

/**
 * 子条件项语句项
 *
 * @author lx
 * @create 2022/12/12 11:27
 **/
@Getter
@Setter
public class ChildConditionSegment extends Segment {

    /**
     * 子条件项
     */
    private AbstractCommonConditionWrapper childConditionWrapper;

    @Override
    public void setHibernateParamByQuery(boolean isHQL, Query query) {
        AbstractCommonConditionWrapper childConditionWrapper = this.getChildConditionWrapper();
        if (childConditionWrapper != null) {
            childConditionWrapper.setHibernateParamByQuery(isHQL, query);
            return;
        }
    }
}
